package com.pzy.module.demo;

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;

import com.pzy.module.demo.domain.DemoEntity;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @GetMapping("/search")
    public List<DemoEntity> search() {
        return this.demoService.list();
    }

    @GetMapping("/test")
    public List<Integer> test() {
        return this.demoService.loadTest();
    }
}
